package com.kzj.fun.graph;

import java.awt.*;

public class Line extends Graph{
    private final Point point1;
    private final Point point2;
    Line(Point point1,Point point2,int stroke, Color color) {
        super(stroke, color);
        this.point1=point1;
        this.point2=point2;
    }

    @Override
    public void draw(Graphics g) {
        g.drawLine(point1.x,point1.y,point2.x,point2.y);
    }
}
